package cn.yudao.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AjaxResult {
    private Boolean success = true;

    private String message = "操作成功";

    /**
    * @Title: setSuccess
    * @Description: set方法 使其支持链式编程
    * @Author: Mr.Jia
    * @Version: 1.0
    * @Date:  2022/6/24 18:09
    * @Parameters:
    * @Return
    */
    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    /**
    * @Title: setMessage
    * @Description: set方法 使其支持链式编程
    * @Author: Mr.Jia
    * @Version: 1.0
    * @Date:  2022/6/24 18:10
    * @Parameters:
    * @Return
    */
    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }
}
